<?php

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of UC_TradePassword_EditAction
 *
 * @author Alen
 */
class UC_TradePassword_EditAction extends PyramidUCAction {
    public function index(){
        $this->display();
    }
    
    public function save(){
        $user=new SoBizUser();
        $msg=$user->update_tradepassword(request_string('password'),request_string('repassword'));
        redirect($msg=='SUCCESS'?'交易密码已设置!':$msg,'?m=UC_TradePassword_Edit&r=success');
    }
}
